//mongoose node 的驱动程序
const mongoose = require("mongoose");

const schema = new mongoose.Schema({
    name: String,// 商品名称
    price:Number,//商品价格
    count:Number,//商品库存
    childId:{type:"ObjectId",ref:"labels"},//对应子类型
    desc:String,//商品描述
    isAttend:Boolean,//是否参加秒杀活动
    image:Array,//相关图片
    poster:Array,//商品海报
});

mongoose.model("comms", schema, "comms");